package com.borrowed.book.system.domain;

import com.borrowed.book.system.util.StringUtils;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;

public class BaseSelectPagePojo {
    @ApiModelProperty(value ="第几页",example = "0",dataType = "Integer")
    private Integer page;
    @ApiModelProperty(value ="每页数量",example = "10",dataType = "Integer")
    private Integer limit;
    @ApiModelProperty(value ="排序列",dataType = "String")
    private String  orderByColumn;
    @ApiModelProperty(value ="排序方式，默认倒序desc",example = "asc",dataType = "String")
    private String sort;


    public String getOrderByColumn() {
        return orderByColumn;
    }

    public void setOrderByColumn(String orderByColumn) {
        this.orderByColumn = orderByColumn;
    }

    public String getSort() {
        return sort;
    }

    public void setSort(String sort) {
        if(StringUtils.isNotEmpty(sort)) {
            this.sort = sort;
        }else{
            this.sort="desc";
        }
    }

    public Integer getPage() {
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }
}
